using B.S.XZYData.ErrorCode;
using MediatR;

namespace B.S.XZYData.Api.Read.Application.Command.Team
{
    /// <summary>
    /// 获取班组详情命令
    /// </summary>
    public class GetTeamDetailCommand : IRequest<ApiResult<TeamDetailDto>>
    {
        /// <summary>
        /// 班组ID
        /// </summary>
        public int TeamId { get; set; }
    }

    /// <summary>
    /// 班组详情DTO
    /// </summary>
    public class TeamDetailDto
    {
        /// <summary>
        /// 班组ID
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 班组名称
        /// </summary>
        public string TeamName { get; set; } = string.Empty;

        /// <summary>
        /// 编组编码
        /// </summary>
        public string TeamCode { get; set; } = string.Empty;

        /// <summary>
        /// 班组类型
        /// </summary>
        public int TeamType { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string Creator { get; set; } = string.Empty;

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? ModifyTime { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        public string Modifier { get; set; } = string.Empty;

        /// <summary>
        /// 班组成员列表
        /// </summary>
        public List<TeamMemberDto> TeamMembers { get; set; } = new List<TeamMemberDto>();
    }

    /// <summary>
    /// 班组成员DTO
    /// </summary>
    public class TeamMemberDto
    {
        /// <summary>
        /// 成员ID
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        public long AccountId { get; set; }

        /// <summary>
        /// 成员名称
        /// </summary>
        public string MemberName { get; set; } = string.Empty;

        /// <summary>
        /// 成员真实姓名
        /// </summary>
        public string MemberRealName { get; set; } = string.Empty;

        /// <summary>
        /// 电话号码
        /// </summary>
        public string? Phone { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string Creator { get; set; } = string.Empty;

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? ModifyTime { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        public string Modifier { get; set; } = string.Empty;
    }
}
